import { createApp } from 'vue'
import App from './App.vue'
import router from './router'
import { ElButton, ElIcon, ElInput, ElDialog, ElLoading, ElMessage } from 'element-plus'
import 'element-plus/dist/index.css'
import './style.css'

const app = createApp(App)

// 批量注册 Element Plus 组件
const components = {
  ElButton,
  ElIcon,
  ElInput,
  ElDialog,
  ElLoading,
  ElMessage
}

Object.entries(components).forEach(([name, component]) => {
  app.component(name, component)
})

app.use(router)
app.mount('#app')
